package Test;

import java.util.ArrayList;
import java.util.Collections;

public class test1 {
    public static void main(String[] args) {
        ArrayList<Integer> list=new ArrayList<>();
        Collections.addAll(list,1,2,3,4,5,6,7,8,9,10);
        list.stream()
                .filter(n -> n % 2==0)
                .forEach(n-> System.out.println(n));
    }
}
